package com.handle.system.api.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统菜单表
 * </p>
 *
 * @author zhangqing
 * @since 2021-03-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysMenu implements Serializable {


    @TableId
    private Long id;

    /**
     * 菜单名称
     */
    @TableField("`name`")
    private String name;

    /**
     * 菜单标识
     */
    @TableField("`key`")
    private String key;

    /**
     * 菜单布局
     */
    private String component;

    /**
     * 菜单名(国际化语言)
     */
    private String title;

    /**
     * 父菜单ID
     */
    private Long parentId;

    /**
     * 显示顺序
     */
    private int orderNum;

    /**
     * 菜单类型（M目录 C菜单 F按钮）
     */
    private String menuType;

    /**
     * 是否是超级管理员可读(0:否 1:是)
     */
    private Boolean isSuperAdminRead;

    /**
     * 菜单状态（1正常 0停用）
     */
    private String status;

    /**
     * 菜单是否隐藏（1隐藏 0显示 2未标示）
     */
    private String hidden;

    /**
     * 子菜单是否隐藏（1隐藏 0显示 2未标示）
     */
    private String hideChildren;

    /**
     * 权限标识
     */
    private String perms;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     * 用于外链使用,如果是外链该值为_blank,否则为空
     */
    private String target;

    /**
     * 链接
     */
    private String path;

    /**
     * 重定向
     */
    private String redirect;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createStaff;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateStaff;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 所属租户
     */
    private String vestInTenant;


    public static final String ID = "id";

    public static final String MENU_NAME = "menu_name";

    public static final String MENU_KEY = "menu_key";

    public static final String COMPONENT = "component";

    public static final String PARENT_ID = "parent_id";

    public static final String ORDER_NUM = "order_num";

    public static final String MENU_TYPE = "menu_type";

    public static final String VISIBLE = "visible";

    public static final String PERMS = "perms";

    public static final String ICON = "icon";

    public static final String PATH = "path";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

    public static final String REMARK = "remark";

}
